<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersCodesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users_codes', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('merchant_id')->index()->default(0)->comment('商户ID');
            $table->string('customerNum',250)->default('')->comment('商户编码');
            $table->string('shopNum',250)->default('')->comment('店铺编码');
            $table->string('shopAccess',250)->default('')->comment('公钥');
            $table->string('shopSecret',250)->default('')->comment('私钥');
            $table->bigInteger('type')->default('0')->comment('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users_codes');
    }
}
